<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    Promise.all([
        new Promise(resolve => {
            setTimeout(() => {
                resolve('res1')
            }, 2000)
        }),
        new Promise(resolve => {
            setTimeout(() => {
                resolve('res2')
            }, 1000)
        })
    ]).then(res => {
        console.log(res);
    })
</script>
</body>
</html>